package org.opu.translator.gui;

import doc2db.Launcher;
import doc2db.UserProp;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextPane;
import javax.swing.text.DefaultStyledDocument;

/**
 *
 * @author yura
 */
public class CheckPatternPane extends JPanel implements ActionListener {
    private JSplitPane vSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    private JSplitPane hSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    private VVTable table = new VVTable();
    private JTextPane text = new JTextPane(new DefaultStyledDocument());
    private JTextPane patterns = new JTextPane(new DefaultStyledDocument());
    private JButton button = new JButton(Launcher.getIcon("tolBar/testLex.png"));


    public CheckPatternPane() {
        super(new BorderLayout());
        this.addComponent();
    }

    private void addComponent(){
        hSplit.setLeftComponent(new JScrollPane(text));
        hSplit.setRightComponent(new JScrollPane(table));
        hSplit.setDividerLocation(500);

        JPanel p = new JPanel(new BorderLayout());
        Box v = Box.createVerticalBox();
        v.add(button);
        v.add(Box.createGlue());
        p.add(patterns);
        p.add(v, BorderLayout.EAST);

        vSplit.setLeftComponent(hSplit);
        vSplit.setRightComponent(p);
        vSplit.setDividerLocation(400);

        add(vSplit);

        text.setFont(UserProp.textFont);
        patterns.setFont(UserProp.textFont);
    }

    @Override
    public void actionPerformed(ActionEvent ae) {
        
    }

}
